package com.agentlab.imitation.bean;

import java.util.List;

public class AssociationZyRule {

	private List<String> rules;
	private String[] result;
	private int time=0; //匹配次数
	private Double support;
	private Double probability;
	
	public String getRuleString()
	{
		String resultStr = "";
		for(String str:rules){
			resultStr += str + ",";
		}
		if(!result.equals("")){ 
			resultStr = resultStr.substring(0, resultStr.length() - 1); //去掉最后一个逗号
			resultStr += "=>";
		}
		for(String s:result){
			resultStr += s + ",";
		}
		resultStr = resultStr.substring(0, resultStr.length() - 1);
		resultStr += "[support:"+support + ",probability:" + probability + "]";
		return resultStr;
	}
	public Double getSupport() {
		return support;
	}
	public void setSupport(Double support) {
		this.support = support;
	}
	public Double getProbability() {
		return probability;
	}
	public void setProbability(Double probability) {
		this.probability = probability;
	}
	
	public int getTime() {
		return time;
	}
	public void setTime(int time) {
		this.time = time;
	}
	public void countTime(){
		time++;
	}
	public int getRuleLength()
	{
		return rules.size();
	}
	public String[] getResult() {
		return result;
	}
	public void setResult(String[] result) {
		this.result = result;
	}
	public List<String> getRules() {
		return rules;
	}
	public void setRules(List<String> rules) {
		this.rules = rules;
	}
}
